# run.py
from app import create_app, socketio

app = create_app()

if __name__ == '__main__':
    # app.run(host='0.0.0.0', port=5000)
    socketio.run(
        app,
        host='127.0.0.1',
        port=5050,
        debug=True,
        # 生产环境应使用 eventlet 或 gevent
        use_reloader=True
    )